package com.lry.rpc.netty.processor;

import com.lry.protocol.RpcMessage;
import com.lry.rpc.netty.MsgType;
import com.lry.spi.LoadLevel;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@LoadLevel(name = "heartbeat_request")
public class HeartBeatRequestProcessor implements Processor{
    @Override
    public void process(Channel channel, RpcMessage request) {
        request.setMessageType(MsgType.HEARTBEAT_RESPONSE.getCode());
        //回应心跳
        channel.writeAndFlush(request);
    }
}
